<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.org/schema/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:p="http://primefaces.org/ui" template="layout/template.xhtml"
    xmlns:pm="http://primefaces.org/mobile" contentType="text/html"
    renderKitId="PRIMEFACES_MOBILE">
  <ui:define name="body">
    <h:form>
      <p:dataList type="inset" styleClass="ui-li-custom">
        <f:attribute name="swatch" value="e" />
        <f:attribute name="dividerSwatch" value="e" />
        <f:facet name="header">会议室信息</f:facet>
        <p:outputPanel layout="block">
          <p:outputLabel for="mrName">会议室名称
            <h:outputText value="*" style="color:red;" />
          </p:outputLabel>
          <p:inputText id="mrName" value="#{meetingRoom.mrName}" />
          <p:outputLabel for="mrType">会议室类型</p:outputLabel>
          <p:inputText id="mrType" value="#{meetingRoom.mrType}" />
          <p:outputLabel for="mrAddr">会议室地址</p:outputLabel>
          <p:inputText id="mrAddr" value="#{meetingRoom.mrAddr}" />
          <p:outputLabel for="mrSize">可容纳人数</p:outputLabel>
          <p:inputText id="mrSize" value="#{meetingRoom.mrSize}" />
          <p:outputLabel for="mrMemo">备注</p:outputLabel>
          <p:inputTextarea id="mrMemo" value="#{meetingRoom.mrMemo}"
                        maxlength="100" autoResize="false" />
          <br />
          <p>
            <h:outputText value="*" style="color:red;" />
            required fields </p>
        </p:outputPanel>
      </p:dataList>
      <pm:buttonGroup orientation="horizontal">
        <p:commandButton value="追加" action="#{meetingRoomAction.create}"
                rendered="#{meetingRoom.mrId==null}" inline="true" />
        <p:commandButton value="修正" action="#{meetingRoomAction.update}"
                rendered="#{meetingRoom.mrId!=null}" inline="true" />
        <p:commandButton value="删除" action="#{meetingRoomAction.deleteView}"
                rendered="#{meetingRoom.mrId!=null}" inline="true"  />
        <p:commandButton value="取消" action="cancel" inline="true"  />
      </pm:buttonGroup>
    </h:form>
  </ui:define>
</ui:composition>
